package com.portal.domain;

import java.util.List;

import com.portal.base.annotation.Column;
import com.portal.base.annotation.Table;
import com.portal.base.dao.BaseDao;
import com.portal.base.dao.IBaseDao;
import com.portal.base.entity.BaseEntity;

/**
 * @Title:行业视点类
 * @Copyright: Copyright (c) 0.1
 * @author:鲁根成
 * @version: 1.0
 * @time: 2011-4-14
 * 
 */
@Table("sys_professional")
public class SysProfessional extends BaseEntity {
	private String title;
	@Column(name = "descrition")
	private String describe;
	@Column(name = "ordNum")
	private int code;
	@Column(name = "reject")
	private List<SysReSearch> childRen;
	@Column(name = "reject")
	private IBaseDao<SysReSearch, Integer> dao;

	public SysProfessional() {
		dao = new BaseDao<SysReSearch, Integer>(SysReSearch.class);
	}

	public List<SysReSearch> getChildRen() {
		return null == childRen ? dao.findList(dao.createSqlQuery(
				"select * from sys_research where categoryId = " + getId())
				.setFirstResult(0).setMaxSize(3).bulidSql()) : childRen;
	}

	public void setChildRen(List<SysReSearch> childRen) {
		this.childRen = childRen;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescribe() {
		return describe;
	}

	public void setDescribe(String describe) {
		this.describe = describe;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}
}
